﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.EnterpriseLibrary.Data;
using AudioCore.Common;
using System.Data;

namespace AudioCore.DAO
{
    internal class FavoriteDao : BaseDao
    {
        internal FavoriteDao()
            : base("Favorite", "FavoriteID")
        {
            db = DatabaseFactory.CreateDatabase(Constant.DATABASE);
        }

        internal int DeleteFavorite(int accountID)
        {
            string sql = "Delete from Favorite where AccountID = {0}";
            sql = string.Format(sql, accountID);
            return db.ExecuteNonQuery(CommandType.Text, sql);
        }
    }
}
